/*
 * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

namespace TencentCloud.Teo.V20220106.Models
{
    using Newtonsoft.Json;
    using System.Collections.Generic;
    using TencentCloud.Common;

    public class RuleCondition : AbstractModel
    {
        
        /// <summary>
        /// 运算符，取值有：
        /// <li> equal: 等于； </li>
        /// <li> notequal: 不等于。</li>
        /// </summary>
        [JsonProperty("Operator")]
        public string Operator{ get; set; }

        /// <summary>
        /// 匹配类型，取值有：
        /// <li> 全部（站点任意请求）: host。 </li>
        /// <li> 文件名: filename； </li>
        /// <li> 文件后缀: extension； </li>
        /// <li> HOST: host； </li>
        /// <li> URL Full: full_url，当前站点下完整 URL 路径，必须包含 HTTP 协议，Host 和 路径； </li>
        /// <li> URL Path: url，当前站点下 URL 路径的请求。 </li>
        /// </summary>
        [JsonProperty("Target")]
        public string Target{ get; set; }

        /// <summary>
        /// 对应匹配类型的参数值，对应匹配类型的取值有：
        /// <li> 文件后缀：jpg、txt等文件后缀；</li>
        /// <li> 文件名称：例如 foo.jpg 中的 foo；</li>
        /// <li> 全部（站点任意请求）： all； </li>
        /// <li> HOST：当前站点下的 host ，例如www.maxx55.com；</li>
        /// <li> URL Path：当前站点下 URL 路径的请求，例如：/example；</li>
        /// <li> URL Full：当前站点下完整 URL 请求，必须包含 HTTP 协议，Host 和 路径，例如：https://www.maxx55.cn/example。</li>
        /// </summary>
        [JsonProperty("Values")]
        public string[] Values{ get; set; }


        /// <summary>
        /// For internal usage only. DO NOT USE IT.
        /// </summary>
        public override void ToMap(Dictionary<string, string> map, string prefix)
        {
            this.SetParamSimple(map, prefix + "Operator", this.Operator);
            this.SetParamSimple(map, prefix + "Target", this.Target);
            this.SetParamArraySimple(map, prefix + "Values.", this.Values);
        }
    }
}

